Skip to content

fix(ui): balance mobile header new-chat edge inset#940

Merged
cursor[bot] merged 17 commits into
mainfrom
cursor/mobile-header-new-chat-inset-66c0
Jul 20, 2026
Merged

fix(ui): balance mobile header new-chat edge inset#940
cursor[bot] merged 17 commits into
mainfrom
cursor/mobile-header-new-chat-inset-66c0

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix phone header new-chat edge spacing by restoring a real .edge-glass-header inset after an unlayered @media (max-width: 639px) rule had zeroed padding and beaten @layer components.
  • Share phone/sm inset via --header-edge-pad: 1rem (aligned with mode-home px-4), keep the unlayered phone guard on the same token, and widen the Answer mode pill reserve to calc(100vw-12rem).
  • Lock symmetry with Playwright geometry checks at 360/390 and a source contract that rejects a max(0px, safe-area) header override.

Verification

  • npm run verify:ui — 242/242 Chromium PR suite on the functional head before the docs/ledger closeout
  • Focused Playwright tests/ui-overlap.spec.ts — 14/14 including new left/right inset symmetry asserts
  • Focused Vitest tests/ui-overlay-css-contract.test.ts — 5/5 including the header-edge-pad contract
  • Live geometry probe at 360/390/640 — header pad and control insets 16px / 16px (delta: 0)
  • Verification not run: full local verify:pr-local unit stage blocked by the known container-only pdf-extraction-budget python ENOENT artifact (also fails on clean main; hosted Unit coverage remains the authority)

Risk and rollout

  • Risk: Low — shared header chrome padding and a mode-pill width reserve only; no API, auth, retrieval, or clinical-output behavior changes.
  • Rollback: Revert the PR squash commit; CSS tokens and tests are additive/self-contained.
  • Provider or production effects: None

Clinical Governance Preflight

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded without explicit governance approval
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy)
  • Service-role keys and private document access remain server-only
  • Demo/synthetic content remains clearly separated from real clinical sources
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative
  • Deployment classification/TGA SaMD impact was checked when clinical decision-support behavior changed

Notes

Summary by CodeRabbit

  • Bug Fixes
    • Improved mobile header spacing so the menu and “Start a new chat” controls stay evenly inset.
    • Introduced consistent, tokenized header edge padding that correctly combines with safe-area insets on small screens.
  • Tests
    • Added UI regression coverage for header layout symmetry on narrow/mobile viewports.
    • Added CSS contract checks to ensure the header padding token is defined and used consistently, preventing zero-padding regressions.

Raise edge-glass-header phone padding to 1rem to match mode-home content,
widen the Answer mode pill viewport reserve, and lock left/right symmetry
with a focused Playwright geometry check.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@supabase

supabase Bot commented Jul 19, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: de90cc74-a4e3-4afd-a2a7-567353530cdc

📥 Commits

Reviewing files that changed from the base of the PR and between e572399 and 20e7469.

📒 Files selected for processing (1)
  • docs/branch-review-ledger.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/branch-review-ledger.md

📝 Walkthrough

Walkthrough

The change centralizes header edge padding in a CSS token, applies it across responsive header rules, and adds Playwright and CSS contract checks for mobile inset symmetry. The branch review ledger records the completed review and remaining headless-browser limitation.

Changes

Mobile header inset alignment

Layer / File(s) Summary
Shared header padding and media rules
src/app/globals.css
Defines --header-edge-pad, applies it to layered and narrow-screen header padding, and removes the intermediate-width override.
Geometry validation and policy records
tests/ui-overlap.spec.ts, tests/ui-overlay-css-contract.test.ts, docs/branch-review-ledger.md
Checks mobile button inset symmetry, enforces the CSS token contract, and records the review verification details.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested labels: codex

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately describes the main UI change: fixing mobile header new-chat edge inset balance.
Description check ✅ Passed The description covers summary, verification, risk/rollout, and governance sections, with a clear note for the blocked verify:pr-local step.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/mobile-header-new-chat-inset-66c0

Comment @coderabbitai help to get the list of available commands.

cursoragent and others added 3 commits July 19, 2026 20:06
Replace the unlayered max-width 639px edge-glass-header 0px padding
override with a matching 1rem inset so it cannot beat the layered rule
and pin new-chat to the bezel.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Share --header-edge-pad between the layered edge-glass-header base and the
unlayered phone media guard, and add a source contract so a 0px override
cannot silently return.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Resolve globals.css token conflict by retaining both --header-edge-pad and
the phone-dock reserve variables from #933.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@cursor
cursor Bot marked this pull request as ready for review July 19, 2026 20:20
@cursor
cursor Bot enabled auto-merge (squash) July 19, 2026 20:20
cursoragent and others added 13 commits July 19, 2026 20:21
Capture the merge-ready outcome, checks, and residual risks for the
mobile new-chat edge spacing fix.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Keep the header-edge-pad fix current with origin/main after #937.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Point the CI body sync at this UI-only change so PR policy can validate
the correct summary, verification, and governance attestations.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Match the exact Supabase target checklist string required by pr-policy.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Revert the mode-pill width nudge (still fits at 1rem phone pad) so the
change set stays UI chrome only, and replace the stale PR_POLICY_BODY.md
with the correct verify:ui evidence for CI body sync.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Accept main's deletion of the leftover policy body template now that the
PR description has been synced and PR policy is green.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Keep main closeout rows from #936/#941/#938 and the #940 review row.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@cursor
cursor Bot merged commit ce7ec04 into main Jul 20, 2026
17 checks passed
@cursor
cursor Bot deleted the cursor/mobile-header-new-chat-inset-66c0 branch July 20, 2026 04:49
cursor Bot pushed a commit that referenced this pull request Jul 20, 2026
A single elementFromPoint sample can miss while the mobile compare
dock is still easing back into view on hosted CI. Poll until the CTA
receives the hit. Phone header inset asymmetry is already fixed by #940.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Jul 20, 2026
Incorporate mobile header new-chat inset fix before Production UI re-run.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Jul 20, 2026
A single elementFromPoint sample can miss while the mobile compare
dock is still easing back into view on hosted CI. Poll until the CTA
receives the hit. Phone header inset asymmetry is already fixed by #940.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
BigSimmo added a commit that referenced this pull request Jul 20, 2026
A single elementFromPoint sample can miss while the mobile compare
dock is still easing back into view on hosted CI. Poll until the CTA
receives the hit. Phone header inset asymmetry is already fixed by #940.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants